home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / array / strlen.c < prev   
C/C++ Source or Header  |  2001-05-12  |  262b  |  28 lines

  1.  
  2. #include "tek/array.h"
  3.  
  4. /* 
  5. **    TEKlib
  6. **    (C) 2001 TEK neoscientists
  7. **    all rights reserved.
  8. **
  9. **    len = TStrLen(TSTRPTR s)
  10. **
  11. **    get length of a string.
  12. **
  13. */
  14.  
  15. TUINT TStrLen(TSTRPTR s)
  16. {
  17.     TUINT l = 0;
  18.     if (s)
  19.     {
  20.         while (*s++)
  21.         {
  22.             l++;
  23.         }
  24.     }
  25.     
  26.     return l;
  27. }
  28.